<?php
include "conecta_mysql.php";

//obtem as variaveis enviadas
$login = "admin";//$_REQUEST["login"];
$senha = "admin";//$_REQUEST["senha"];
//realiza a consulta no banco de dados
$sql = "SELECT * FROM hot_t_usuario WHERE usu_login='$login' AND usu_senha='$senha'";
$query = mysql_query($sql) or die ("Erro: ".mysql_error());
if(mysql_num_rows($query) == 0)
	echo "false";
else{
	while($coluna=mysql_fetch_array($query)){
		$usuario_id = $coluna["usu_id"];
		$usuario_descricao = $coluna["usu_descricao"];
	}
	//inicia sessao
	session_start();
	//registra na sessao
	$_SESSION[usuario_id] = $usuario_id;
	$_SESSION[usuario_descricao] = $usuario_descricao;
	//login e senha estao corretos
	echo "true";
}

include "fecha_conecta_mysql.php";
?>